package dome1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2024-05-22
 * Time: 19:33
 */
public class Dog extends Animal{
    {
        System.out.println("Dog类的实例代码块被执行了...");
    }
    public Dog(String name, int age) {
        super(name, age);
        System.out.println("Dog类的构造方法被执行了...");
    }

    static {
        System.out.println("Dog类的静态代码块被执行了...");
    }
    public void bark() {
        System.out.println(super.name + "正在汪汪叫...");
    }
}
